package com.sumainfor.pc.market.controller.rentadviser;

import com.sumainfor.common.util.FieldCheckUtil;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.PageUtils;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.market.service.CityService;
import com.sumainfor.pc.market.service.RdSubletApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 转租申请
 */
@RestController
@RequestMapping("/tenant/key/rentadviser/RdWxSubletApply")
public class RdWxSubletApplyController {

    @Autowired
    private RdSubletApplyService rdSubletApplyService;

    /**
     *新增转租申请
     */
    @PostMapping("/addSubletApply")
    public JsonResult addSubletApply(@RequestBody Map<String,Object>params, Pager pager){
        return rdSubletApplyService.addSubletApply(params);
    }
    /**
     *租客取消转租上架
     */
    @PostMapping("/updateCancelApply")
    public JsonResult updateCancelApply(@RequestBody Map<String,Object>params){
        System.out.println("接受到的参数:"+params);
        return rdSubletApplyService.updateCancelApply(params);
    }
    /**
     *租客取消转租上架
     */
    @GetMapping("/getSubApplyCount")
    public JsonResult getSubApplyCount(@RequestParam Map<String,Object>params){
        return rdSubletApplyService.getSubApplyCount(params);
    }
}
